package cn.source.web.controller.api;

import cn.source.common.core.controller.BaseController;
import cn.source.common.core.page.TableDataInfo;
import cn.source.system.domain.HouseVillage;
import cn.source.system.service.IHouseVillageService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
@RequestMapping("/api/village")
public class VillageController extends BaseController {

    @Resource
    private IHouseVillageService houseVillageService;

    /**
     * @Description: 获取小区列表
     */
    @GetMapping("/list")
    public TableDataInfo findVillageList(HouseVillage houseVillage) {
        startPage();
        List<HouseVillage> list = houseVillageService.selectHouseVillageList(houseVillage);
        return getDataTable(list);
    }
}
